package com.victor.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.victor.dao.OrderuserDao;
import com.victor.entity.ticketorder.OrderUserInfo;
import com.victor.service.OrderuserService;
@Service
public class OrderuserServiceImpl implements OrderuserService{
	@Autowired
	private OrderuserDao dao;

	@Override
	public boolean insert(OrderUserInfo orderUserInfo) {
		return dao.insert(orderUserInfo);
	}

	@Override
	public boolean delete(int[] ids) {
		return dao.delete(ids);
	}

	@Override
	public boolean update(OrderUserInfo orderUserInfo) {
		return dao.update(orderUserInfo);
	}

	@Override
	public PageInfo<OrderUserInfo> selAllByUid(String uid, int page, int row) {
		PageHelper.startPage(page, row);
		List<OrderUserInfo> list = dao.selAllByUid(uid);
		return new PageInfo<>(list, 5);
	}

	@Override
	public boolean updateMoren(String id, String uid) {
		return dao.updateMoren(id,uid);
	}

}
